package com.muyu.cloud.system.domain.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

/**
 * @Author: DongZeLiang
 * @date: 2024/5/23
 * @Description: 书籍添加请求对象
 * @Version: 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BookInfoSaveReq {

    /**
     * 书籍名称
     */
    @NotBlank(message = "书籍名称不可为空")
    private String name;
    /**
     * 书籍作者
     */
    @NotBlank(message = "作者名称不可为空")
    private String author;
    /**
     * 价格
     */
    @Min(value = 0L, message = "价格最小不可小于0元")
    private BigDecimal price;
}
